﻿using Kstopa.Domain;
using Kstopa.Sqlsugar.Serivices.System.User;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Services;

namespace Yi.Abp.Application.Services
{
    public class TestService: ApplicationService
    {
        private readonly ISysUserService _sysUserService;

        //WebAPi
        public TestService(ISysUserService sysUserService)
        {
            _sysUserService=sysUserService;
        }
        /// <summary>
        /// 你好世界
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public string GetHelloWorld(string? name)
        {
            return name ?? "HelloWord";
        }

        [HttpGet("/api/test/getall")]
        public async Task<List<SysUser>> GetAll()
        {
            return await _sysUserService.GetListAsync();
        }
    }
}
